UTILS  = gumbowrap.c 

RENRENDAI_CFILE	=	$(UTILS) \
					renrendailogin.c \
					renrendaigetlist.c \
					renrendaigetdetail.c \
					renrendai.c	

TEST_CFILE = $(WORKER) \
				renrendailogin.c \
				 renrendaigetlist.c \
					renrendai.c	\
				 testspider.c
			
CC = gcc -g -fPIC -O0

c_RENRENDAI_FILE_o = $(RENRENDAI_CFILE:.c=.o)

LIBPATH	=	-L. \
			-L/home/hotmocha/exlib/lib

INCLUDEPATH	=	-I. \
			-I/usr/local/include \
			-I/home/hotmocha/exlib/include \
			-I/home/hotmocha/exlib/include/yajl

ADDLIB	=  -lyajl -lgumbo -lcrypto -lspider


.SUFFIXES:.c
.c.o    :
	$(CC) $(CFLAGS) -c $<  $(INCLUDEPATH)

renrendai:	$(c_RENRENDAI_FILE_o) 
	$(CC) -o $@ $(c_RENRENDAI_FILE_o)  $(LIBPATH) $(ADDLIB) 

clean:
	rm -rf *.o 

#-include $(c_FILE_o:.o=.d) #依赖.d
%.d:%.c
	@set -e;\
	mkdir -p $(BUILD); \
	rm -f $@; $(CC) -MM $< $(INCLUDEFLAGS) >  $@.$$$$; \
	sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	rm -f $@.$$$$

checkso:
	gcc -o checkso dl.c -ldl
